package com.zto.sch.base.list;

import java.util.ArrayList;
import java.util.List;

/**
 * @program: sch-diy-parent
 * @description:
 * @author: sch
 * @create: 2021-06-08 18:29
 **/
public class ListSubList {
    public static void main(String[] args) {
        List<Integer> list = getList(10);

        System.out.println(list.subList(0, 10));
    }

    private static List<Integer> getList(int i) {
        List<Integer> list = new ArrayList<>();
        for (int j = 0; j < i; j++) {
            list.add(j);
        }
        return list;
    }
}
